using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._AnalysisTools._Proximity
{
    /// <summary>
    /// <para>Create Thiessen Polygons</para>
    /// <para>Creates Thiessen polygons from point features.</para>
    /// <para>根据点要素创建 Thiessen 面。</para>
    /// </summary>    
    [DisplayName("Create Thiessen Polygons")]
    public class CreateThiessenPolygons : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateThiessenPolygons()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The point input features from which Thiessen polygons will be generated.</para>
        /// <para>将从中生成 Thiessen 面的点输入要素。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output feature class containing the Thiessen polygons that are generated from the point input features.</para>
        /// <para>包含从点输入要素生成的 Thiessen 面的输出要素类。</para>
        /// </param>
        public CreateThiessenPolygons(object _in_features, object _out_feature_class)
        {
            this._in_features = _in_features;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Analysis Tools";

        public override string ToolName => "Create Thiessen Polygons";

        public override string CallName => "analysis.CreateThiessenPolygons";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "extent", "geographicTransformations", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_features, _out_feature_class, _fields_to_copy.GetGPValue()];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The point input features from which Thiessen polygons will be generated.</para>
        /// <para>将从中生成 Thiessen 面的点输入要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output feature class containing the Thiessen polygons that are generated from the point input features.</para>
        /// <para>包含从点输入要素生成的 Thiessen 面的输出要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Output Fields</para>
        /// <para><xdoc>
        ///   <para>Specifies which fields from the input features will be transferred to the output feature class.</para>
        ///   <bulletList>
        ///     <bullet_item>Only Feature ID—Only the FID field from the input features will be transferred to the output feature class. This is the default.</bullet_item><para/>
        ///     <bullet_item>All fields—All fields from the input features will be transferred to the output feature class.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输入要素中的哪些字段将传输到输出要素类。</para>
        ///   <bulletList>
        ///     <bullet_item>仅要素 ID - 仅输入要素中的 FID 字段将传输到输出要素类。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>所有字段—输入要素中的所有字段都将传输到输出要素类。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _fields_to_copy_value _fields_to_copy { get; set; } = _fields_to_copy_value._ONLY_FID;

        public enum _fields_to_copy_value
        {
            /// <summary>
            /// <para>Only Feature ID</para>
            /// <para>Only Feature ID—Only the FID field from the input features will be transferred to the output feature class. This is the default.</para>
            /// <para>仅要素 ID - 仅输入要素中的 FID 字段将传输到输出要素类。这是默认设置。</para>
            /// </summary>
            [Description("Only Feature ID")]
            [GPEnumValue("ONLY_FID")]
            _ONLY_FID,

            /// <summary>
            /// <para>All fields</para>
            /// <para>All fields—All fields from the input features will be transferred to the output feature class.</para>
            /// <para>所有字段—输入要素中的所有字段都将传输到输出要素类。</para>
            /// </summary>
            [Description("All fields")]
            [GPEnumValue("ALL")]
            _ALL,

        }

        public CreateThiessenPolygons SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}